import 'package:flutter/material.dart';


class PicList extends StatefulWidget {
  const PicList({ Key? key }) : super(key: key);

  @override
  State<PicList> createState() => _PicListState();
}

class _PicListState extends State<PicList> {

  var picLit = [
    {"url": "images/user.jpeg", "desc": "柔软好用噢噢噢噢噢噢噢噢噢噢噢噢噢噢噢噢哦哦哦噢噢噢噢噢噢噢噢噢噢噢噢哦哦", "title": "洗脸巾"},
    {"url": "images/user.jpeg", "desc": "专属好礼", "title": "面膜"},
    {"url": "images/user.jpeg", "desc": "灭菌洗手", "title": "消毒液"},
    {"url": "images/user.jpeg", "desc": "柔软厚实", "title": "纸巾"},
    {"url": "images/user.jpeg", "desc": "时尚", "title": "睡衣"},
  ];

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: picLit.map((Map e) {
        return Card(
          margin: const EdgeInsets.all(10),
          child: Column(
            children: <Widget>[
              AspectRatio(
                aspectRatio: 16 / 13,
                child: Image.asset(
                  e["url"],
                  fit: BoxFit.cover,
                ),
              ),
              ListTile(
                leading: ClipOval(
                  child: Image.asset(
                    e["url"],
                    fit: BoxFit.cover,
                    height: 60,
                    width: 60,
                  ),
                ),
                title: Text(
                  e["title"],
                  style:const TextStyle(fontSize: 28),
                ),
                subtitle: Text(
                  e["desc"].toString(),
                  overflow: TextOverflow.ellipsis,
                  maxLines: 2,
                  style:const TextStyle(fontSize: 18, color: Colors.red),
                ),
              )
            ],
          ),
        );
      }).toList(),
    );
  }
}